import React, { memo } from "react";
import { Tabs } from "antd";

const { TabPane } = Tabs;

function ChartComponent() {
  function callback(key) {
    console.log(key);
  }
  return (
    <div>
      <Tabs defaultActiveKey="1" onChange={callback}>
        <TabPane tab="销售额" key="1">
          Content of Tab 销售额
        </TabPane>
        <TabPane tab="访问量" key="2">
          Content of Tab 访问量
        </TabPane>
      </Tabs>
    </div>
  );
}

export default memo(ChartComponent);
